package com.jsd2412.backend.bed.mapper;

import com.jsd2412.backend.bed.pojo.dto.BedQuery;
import com.jsd2412.backend.bed.pojo.entity.Bed;
import com.jsd2412.backend.bed.pojo.vo.BedVO;
import org.springframework.stereotype.Repository;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Repository
public interface BedMapper {
    List<BedVO> select(BedQuery bedQuery);

    void insert(Bed bed);

    void update(Bed bed);

    void delete(Integer id);

    BedVO selectById(Integer id);

    List<BedVO> selectBedCardList(BedQuery bedQuery);

    List<BedVO> selectEmptyBedList(BedQuery bedQuery);

    void updateStatus(@Param("bedId") Integer bedId,
                      @Param("number") Integer number,
                      @Param("roomId") Integer roomId,
                      @Param("status") String status);

    int getBedTotalByRoom(Integer roomId);

    List<BedVO> selectBedList(BedQuery bedQuery);
}
